import stoneRequest from "../index"

//注册
export function registerUser(user: any ={}) {
  return stoneRequest.post({
    url: '/users',
    data: user
  })
}

//登录
export function loginRequest(name: string, password: string) {
  return stoneRequest.post({
    url: '/login',
    data: {
      name,
      password
    }
  })
}


export function getUserInfoById(id: number) {
  return stoneRequest.get({
    url: `/users/${id}/info`,
  })
}
